import sys
sys.path.append('/data/xingshiyou-slurm/codeLLM/GPT-respond')

from data_w_r import read_data, write_data
import json


if __name__ == '__main__':
    test_list = read_data('/data/xingshiyou-slurm/codeLLM/data/test_B/Q_B_without_answer.jsonl')

    res = [
        {
        "instruction": f'{test["prefix"]}<FILL_ME>{test["fim_suffix"]}',
        "input": "",
        "output": "",
        "system": "",
        "history": []
        } for test in test_list
    ]

    with open('/data/xingshiyou-slurm/codeLLM/data/test_A/Q_B_without_answer_llamafactory.json', 'w')as f:
        json.dump(res, f, ensure_ascii=False, indent=4)
